package day05;
//break的演示
public class BreakDemo {
    public static void main(String[] args) {
        for (int num = 1; num <= 9; ++num) {
            if (num == 4) {
                break;
            }
            System.out.println(num);
        }
        /*
        num=1 true 1 num++
        num=2 true 2 num++
        num=3 true 3 num++
        num=4 true 4 num==4 执行if里的break语句跳出for循环
        for循环结束
         */
    }
}
